package com.neusoft.hifly.rpc.sms.dao;

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

import com.neusoft.hifly.core.pojo.ApiResponse;
import com.neusoft.hifly.rpc.sms.dao.fallback.SMSFallback;
import com.neusoft.hifly.rpc.sms.domain.SMSToDoDTO;
import com.neusoft.hifly.rpc.sms.domain.SendDetailDTO;

/**
 * Title: 短信服务
 * <p>
 * Description: 短信 Dao
 * <p>
 * Copyright: 2019
 * <p>
 * Company: 东软汉枫
 *
 * @author lh_neu
 * @version 1.0.0
 */
@FeignClient(value = "ctcloud-cbb-push", fallbackFactory = SMSFallback.class)
public interface ISMSDao {
	/**
	 * 阿里大于发送短信
	 *
	 * @param smsVO
	 *            短信实体对象JSON串
	 * @return 是否成功
	 */
	@RequestMapping(value = "/push/api/v1/sms/send/aliyun", method = RequestMethod.POST)
	<T> ApiResponse<T> sendByAliyun(@RequestBody final SendDetailDTO smsVO);

	/**
	 * 发送普通短信
	 *
	 * @param smsVO
	 *            短信实体对象JSON串
	 * @return 是否成功
	 */
	@RequestMapping(value = "/push/api/v1/sms/send/gateway", method = RequestMethod.POST)
	<T> ApiResponse<T> sendByGateway(@RequestBody final SMSToDoDTO smsVO);

}
